package com.lingxu.base.system.manage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lingxu.base.system.manage.entity.MenuTree;
import com.lingxu.base.system.manage.entity.SysRoleMenu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 角色_菜单关联表
 * @Author: LingXu
 * @Date:   2021-01-04
 * @Version: V1.0.1
 */
public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {


    void deleteByMenuIds(@Param("menuIds") List<String> menuIds);

    Integer cancelRoleMenus(@Param("roleId")String roleId,@Param("menuIds")String menuIds);

    Integer cancelRoleMenusAll(@Param("roleId") String roleId);

    List<MenuTree> queryExistMenuTreeByRoleid(@Param("roleid")String roleid);

    List<MenuTree> queryNotExistMenuTreeByRoleid(@Param("menuid")String menuid);

    List<String> queryNotExistMenuIdByRoleid(@Param("roleid")String roleid);

    int findMenu(List<String> roleids);
}
